import { request } from "@/utils/service"

/**
 * @param data 获取产品列表
 * @returns
 */
export const apiProductList = (data: any) => {
  return request<any>({
    url: "/product/list",
    method: "POST",
    data
  })
}
/**
 * @param data 修改产品
 * @returns
 */
export const apiProductUpdate = (data: any) => {
  return request<any>({
    url: "/product/update",
    method: "POST",
    data,
    headers: {
      "Content-Type": false,
      "Process-Data": false
    }
  })
}
/**
 * @param data 添加产品
 * @returns
 */
export const apiProductAdd = (data: any) => {
  return request<any>({
    url: "/product/add",
    method: "POST",
    data,
    headers: {
      "Content-Type": false,
      "Process-Data": false
    }
  })
}
/**
 * @param data 创建产品订单
 * @returns
 */
export const apiBillProduct = (data: any) => {
  return request<any>({
    url: "/bill/product",
    method: "POST",
    data
  })
}
/**
 * @param data 删除产品订单
 * @returns
 */
export const apiProductDel = (data: any) => {
  return request<any>({
    url: "/product/del",
    method: "POST",
    data
  })
}
